import React from 'react'
import GuestIndex from '@/components/Guest/Index'
import GuestAdd from '@/components/Guest/Add'
import GuestEdit from '@/components/Guest/Edit'

// 路由列表 二级路由结构
const list = [
  {
    path: 'index', // /guest/index
    component: GuestIndex,
    auth: true,
  },
  {
    path: 'add', // /guest/add
    component: GuestAdd,
  },
  {
    path: 'edit', // /guest/edit
    component: GuestEdit,
  }
]

// 构建父级路由的组件结构
const Layout = () => <React.Router.Outlet />

// 构建顶级路由
const RouterList = [
  {
    path: '/guest', //路由嵌套 父级路由
    component: Layout,
    children: list,
  }
]


export default RouterList
